#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

#include "builtins.h"
#include "defs.h"

void cm_cd(char* path) {
	if(chdir(path) < 0)
		printf("Error on changing to directory...\n");
}

void cm_help() {
	FILE* arq_help;
	char lido[1024];
	arq_help = fopen(ARQ_HELP, "r");
	while(fgets(lido, 1024, arq_help)!=NULL) {
		printf("%s", lido);
	}
	fclose(arq_help);
}

void cm_exit() {
	exit(0);
}
